/**
 * 
 */

function Init(){
	var b = document.getElementById("btn").onclick = btnclick;
}

function btnclick(){
	var f = document.frm;
	var l = f.chk.length; 
	var random = Math.floor(Math.random() * f.chk.length);
	for(i=0 ; i <l; ++i){	
		if(f.chk[i].checked){ 
			f.result.style.backgroundColor=f.chk[i].value;
			f.result.style.color = f.chk[random].value;		}
	}
		
}	

/*
function chk2() {
	   var f = document.frm;
	   
	   
	   var col ="#";
	   for(i = 0; i<6; i++){
	      var ran = Math.floor(Math.random()*15);
	      
	      if(ran == 10){
	         col +="a";
	      }
	      else if(ran == 11){
	         col +="b";
	      }
	      else if(ran == 12){
	         col +="c";
	      }
	      else if(ran == 13){
	         col +="d";
	      }
	      else if(ran == 14){
	         col +="e";
	      }
	      else if(ran == 14){
	         col +="f";
	      }
	      else{
	         col +=ran;
	      }
	   }
	   f.result.style.backgroundColor = col;
	   f.result.style.color = col;
	}*/